{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "5d828e3d",
   "metadata": {},
   "source": [
    "### Upload to  Pypi"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "60b279bc",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "running sdist\n",
      "running egg_info\n",
      "creating torchkeras.egg-info\n",
      "writing torchkeras.egg-info/PKG-INFO\n",
      "writing dependency_links to torchkeras.egg-info/dependency_links.txt\n",
      "writing requirements to torchkeras.egg-info/requires.txt\n",
      "writing top-level names to torchkeras.egg-info/top_level.txt\n",
      "writing manifest file 'torchkeras.egg-info/SOURCES.txt'\n",
      "reading manifest file 'torchkeras.egg-info/SOURCES.txt'\n",
      "reading manifest template 'MANIFEST.in'\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "warning: no files found matching 'torchkeras/*.ttf'\n",
      "no previously-included directories found matching 'torchkeras/assets/*checkpoint*'\n",
      "warning: no files found matching '*.png' under directory 'torchkeras/assets'\n",
      "warning: no files found matching '*.jpeg' under directory 'torchkeras/assets'\n",
      "warning: no previously-included files matching '*' found under directory 'torchkeras/__pycache__'\n",
      "warning: no previously-included files matching '*' found under directory 'torchkeras/.ipynb_checkpoints'\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "adding license file 'LICENSE'\n",
      "writing manifest file 'torchkeras.egg-info/SOURCES.txt'\n",
      "running check\n",
      "creating torchkeras-3.9.1\n",
      "creating torchkeras-3.9.1/torchkeras\n",
      "creating torchkeras-3.9.1/torchkeras.egg-info\n",
      "creating torchkeras-3.9.1/torchkeras/assets\n",
      "creating torchkeras-3.9.1/torchkeras/chat\n",
      "creating torchkeras-3.9.1/torchkeras/models\n",
      "creating torchkeras-3.9.1/torchkeras/tools\n",
      "copying files to torchkeras-3.9.1...\n",
      "copying LICENSE -> torchkeras-3.9.1\n",
      "copying MANIFEST.in -> torchkeras-3.9.1\n",
      "copying README.md -> torchkeras-3.9.1\n",
      "copying setup.py -> torchkeras-3.9.1\n",
      "copying torchkeras/__init__.py -> torchkeras-3.9.1/torchkeras\n",
      "copying torchkeras/data.py -> torchkeras-3.9.1/torchkeras\n",
      "copying torchkeras/eda.py -> torchkeras-3.9.1/torchkeras\n",
      "copying torchkeras/email.py -> torchkeras-3.9.1/torchkeras\n",
      "copying torchkeras/hugmodel.py -> torchkeras-3.9.1/torchkeras\n",
      "copying torchkeras/kerascallbacks.py -> torchkeras-3.9.1/torchkeras\n",
      "copying torchkeras/kerasmodel.py -> torchkeras-3.9.1/torchkeras\n",
      "copying torchkeras/metrics.py -> torchkeras-3.9.1/torchkeras\n",
      "copying torchkeras/pbar.py -> torchkeras-3.9.1/torchkeras\n",
      "copying torchkeras/plots.py -> torchkeras-3.9.1/torchkeras\n",
      "copying torchkeras/soup.py -> torchkeras-3.9.1/torchkeras\n",
      "copying torchkeras/summary.py -> torchkeras-3.9.1/torchkeras\n",
      "copying torchkeras/utils.py -> torchkeras-3.9.1/torchkeras\n",
      "copying torchkeras.egg-info/PKG-INFO -> torchkeras-3.9.1/torchkeras.egg-info\n",
      "copying torchkeras.egg-info/SOURCES.txt -> torchkeras-3.9.1/torchkeras.egg-info\n",
      "copying torchkeras.egg-info/dependency_links.txt -> torchkeras-3.9.1/torchkeras.egg-info\n",
      "copying torchkeras.egg-info/requires.txt -> torchkeras-3.9.1/torchkeras.egg-info\n",
      "copying torchkeras.egg-info/top_level.txt -> torchkeras-3.9.1/torchkeras.egg-info\n",
      "copying torchkeras/assets/SimHei.ttf -> torchkeras-3.9.1/torchkeras/assets\n",
      "copying torchkeras/assets/park.jpg -> torchkeras-3.9.1/torchkeras/assets\n",
      "copying torchkeras/assets/zidane.jpg -> torchkeras-3.9.1/torchkeras/assets\n",
      "copying torchkeras/chat/__init__.py -> torchkeras-3.9.1/torchkeras/chat\n",
      "copying torchkeras/chat/chatglm.py -> torchkeras-3.9.1/torchkeras/chat\n",
      "copying torchkeras/chat/chatgpt.py -> torchkeras-3.9.1/torchkeras/chat\n",
      "copying torchkeras/models/__init__.py -> torchkeras-3.9.1/torchkeras/models\n",
      "copying torchkeras/models/resnet.py -> torchkeras-3.9.1/torchkeras/models\n",
      "copying torchkeras/models/ssd.py -> torchkeras-3.9.1/torchkeras/models\n",
      "copying torchkeras/models/unet.py -> torchkeras-3.9.1/torchkeras/models\n",
      "copying torchkeras/tools/catboost.py -> torchkeras-3.9.1/torchkeras/tools\n",
      "Writing torchkeras-3.9.1/setup.cfg\n",
      "creating dist\n",
      "Creating tar archive\n",
      "removing 'torchkeras-3.9.1' (and everything under it)\n",
      "running bdist_wheel\n",
      "running build\n",
      "running build_py\n",
      "copying torchkeras/__init__.py -> build/lib/torchkeras\n",
      "copying torchkeras/chat/chatglm.py -> build/lib/torchkeras/chat\n",
      "creating build/lib/build\n",
      "creating build/lib/build/lib\n",
      "creating build/lib/build/lib/torchkeras\n",
      "copying build/lib/torchkeras/metrics.py -> build/lib/build/lib/torchkeras\n",
      "copying build/lib/torchkeras/hugmodel.py -> build/lib/build/lib/torchkeras\n",
      "copying build/lib/torchkeras/__init__.py -> build/lib/build/lib/torchkeras\n",
      "copying build/lib/torchkeras/soup.py -> build/lib/build/lib/torchkeras\n",
      "copying build/lib/torchkeras/kerasmodel.py -> build/lib/build/lib/torchkeras\n",
      "copying build/lib/torchkeras/summary.py -> build/lib/build/lib/torchkeras\n",
      "copying build/lib/torchkeras/eda.py -> build/lib/build/lib/torchkeras\n",
      "copying build/lib/torchkeras/plots.py -> build/lib/build/lib/torchkeras\n",
      "copying build/lib/torchkeras/utils.py -> build/lib/build/lib/torchkeras\n",
      "copying build/lib/torchkeras/email.py -> build/lib/build/lib/torchkeras\n",
      "copying build/lib/torchkeras/pbar.py -> build/lib/build/lib/torchkeras\n",
      "copying build/lib/torchkeras/data.py -> build/lib/build/lib/torchkeras\n",
      "copying build/lib/torchkeras/kerascallbacks.py -> build/lib/build/lib/torchkeras\n",
      "creating build/lib/build/lib/torchkeras/tools\n",
      "copying build/lib/torchkeras/tools/catboost.py -> build/lib/build/lib/torchkeras/tools\n",
      "creating build/lib/build/lib/torchkeras/chat\n",
      "copying build/lib/torchkeras/chat/chatglm.py -> build/lib/build/lib/torchkeras/chat\n",
      "copying build/lib/torchkeras/chat/__init__.py -> build/lib/build/lib/torchkeras/chat\n",
      "copying build/lib/torchkeras/chat/chatgpt.py -> build/lib/build/lib/torchkeras/chat\n",
      "creating build/lib/build/lib/torchkeras/models\n",
      "copying build/lib/torchkeras/models/ssd.py -> build/lib/build/lib/torchkeras/models\n",
      "copying build/lib/torchkeras/models/unet.py -> build/lib/build/lib/torchkeras/models\n",
      "copying build/lib/torchkeras/models/__init__.py -> build/lib/build/lib/torchkeras/models\n",
      "copying build/lib/torchkeras/models/resnet.py -> build/lib/build/lib/torchkeras/models\n",
      "installing to build/bdist.macosx-11.0-arm64/wheel\n",
      "running install\n",
      "running install_lib\n",
      "creating build/bdist.macosx-11.0-arm64/wheel\n",
      "creating build/bdist.macosx-11.0-arm64/wheel/torchkeras\n",
      "copying build/lib/torchkeras/metrics.py -> build/bdist.macosx-11.0-arm64/wheel/torchkeras\n",
      "creating build/bdist.macosx-11.0-arm64/wheel/torchkeras/tools\n",
      "copying build/lib/torchkeras/tools/catboost.py -> build/bdist.macosx-11.0-arm64/wheel/torchkeras/tools\n",
      "copying build/lib/torchkeras/hugmodel.py -> build/bdist.macosx-11.0-arm64/wheel/torchkeras\n",
      "creating build/bdist.macosx-11.0-arm64/wheel/torchkeras/chat\n",
      "copying build/lib/torchkeras/chat/chatglm.py -> build/bdist.macosx-11.0-arm64/wheel/torchkeras/chat\n",
      "copying build/lib/torchkeras/chat/__init__.py -> build/bdist.macosx-11.0-arm64/wheel/torchkeras/chat\n",
      "copying build/lib/torchkeras/chat/chatgpt.py -> build/bdist.macosx-11.0-arm64/wheel/torchkeras/chat\n",
      "copying build/lib/torchkeras/__init__.py -> build/bdist.macosx-11.0-arm64/wheel/torchkeras\n",
      "creating build/bdist.macosx-11.0-arm64/wheel/torchkeras/models\n",
      "copying build/lib/torchkeras/models/ssd.py -> build/bdist.macosx-11.0-arm64/wheel/torchkeras/models\n",
      "copying build/lib/torchkeras/models/unet.py -> build/bdist.macosx-11.0-arm64/wheel/torchkeras/models\n",
      "copying build/lib/torchkeras/models/__init__.py -> build/bdist.macosx-11.0-arm64/wheel/torchkeras/models\n",
      "copying build/lib/torchkeras/models/resnet.py -> build/bdist.macosx-11.0-arm64/wheel/torchkeras/models\n",
      "copying build/lib/torchkeras/soup.py -> build/bdist.macosx-11.0-arm64/wheel/torchkeras\n",
      "copying build/lib/torchkeras/kerasmodel.py -> build/bdist.macosx-11.0-arm64/wheel/torchkeras\n",
      "copying build/lib/torchkeras/summary.py -> build/bdist.macosx-11.0-arm64/wheel/torchkeras\n",
      "copying build/lib/torchkeras/eda.py -> build/bdist.macosx-11.0-arm64/wheel/torchkeras\n",
      "copying build/lib/torchkeras/plots.py -> build/bdist.macosx-11.0-arm64/wheel/torchkeras\n",
      "copying build/lib/torchkeras/utils.py -> build/bdist.macosx-11.0-arm64/wheel/torchkeras\n",
      "copying build/lib/torchkeras/email.py -> build/bdist.macosx-11.0-arm64/wheel/torchkeras\n",
      "copying build/lib/torchkeras/pbar.py -> build/bdist.macosx-11.0-arm64/wheel/torchkeras\n",
      "creating build/bdist.macosx-11.0-arm64/wheel/torchkeras/assets\n",
      "copying build/lib/torchkeras/assets/park.jpg -> build/bdist.macosx-11.0-arm64/wheel/torchkeras/assets\n",
      "copying build/lib/torchkeras/assets/SimHei.ttf -> build/bdist.macosx-11.0-arm64/wheel/torchkeras/assets\n",
      "copying build/lib/torchkeras/assets/zidane.jpg -> build/bdist.macosx-11.0-arm64/wheel/torchkeras/assets\n",
      "copying build/lib/torchkeras/data.py -> build/bdist.macosx-11.0-arm64/wheel/torchkeras\n",
      "copying build/lib/torchkeras/kerascallbacks.py -> build/bdist.macosx-11.0-arm64/wheel/torchkeras\n",
      "creating build/bdist.macosx-11.0-arm64/wheel/build\n",
      "creating build/bdist.macosx-11.0-arm64/wheel/build/lib\n",
      "creating build/bdist.macosx-11.0-arm64/wheel/build/lib/torchkeras\n",
      "copying build/lib/build/lib/torchkeras/metrics.py -> build/bdist.macosx-11.0-arm64/wheel/build/lib/torchkeras\n",
      "creating build/bdist.macosx-11.0-arm64/wheel/build/lib/torchkeras/tools\n",
      "copying build/lib/build/lib/torchkeras/tools/catboost.py -> build/bdist.macosx-11.0-arm64/wheel/build/lib/torchkeras/tools\n",
      "copying build/lib/build/lib/torchkeras/hugmodel.py -> build/bdist.macosx-11.0-arm64/wheel/build/lib/torchkeras\n",
      "creating build/bdist.macosx-11.0-arm64/wheel/build/lib/torchkeras/chat\n",
      "copying build/lib/build/lib/torchkeras/chat/chatglm.py -> build/bdist.macosx-11.0-arm64/wheel/build/lib/torchkeras/chat\n",
      "copying build/lib/build/lib/torchkeras/chat/__init__.py -> build/bdist.macosx-11.0-arm64/wheel/build/lib/torchkeras/chat\n",
      "copying build/lib/build/lib/torchkeras/chat/chatgpt.py -> build/bdist.macosx-11.0-arm64/wheel/build/lib/torchkeras/chat\n",
      "copying build/lib/build/lib/torchkeras/__init__.py -> build/bdist.macosx-11.0-arm64/wheel/build/lib/torchkeras\n",
      "creating build/bdist.macosx-11.0-arm64/wheel/build/lib/torchkeras/models\n",
      "copying build/lib/build/lib/torchkeras/models/ssd.py -> build/bdist.macosx-11.0-arm64/wheel/build/lib/torchkeras/models\n",
      "copying build/lib/build/lib/torchkeras/models/unet.py -> build/bdist.macosx-11.0-arm64/wheel/build/lib/torchkeras/models\n",
      "copying build/lib/build/lib/torchkeras/models/__init__.py -> build/bdist.macosx-11.0-arm64/wheel/build/lib/torchkeras/models\n",
      "copying build/lib/build/lib/torchkeras/models/resnet.py -> build/bdist.macosx-11.0-arm64/wheel/build/lib/torchkeras/models\n",
      "copying build/lib/build/lib/torchkeras/soup.py -> build/bdist.macosx-11.0-arm64/wheel/build/lib/torchkeras\n",
      "copying build/lib/build/lib/torchkeras/kerasmodel.py -> build/bdist.macosx-11.0-arm64/wheel/build/lib/torchkeras\n",
      "copying build/lib/build/lib/torchkeras/summary.py -> build/bdist.macosx-11.0-arm64/wheel/build/lib/torchkeras\n",
      "copying build/lib/build/lib/torchkeras/eda.py -> build/bdist.macosx-11.0-arm64/wheel/build/lib/torchkeras\n",
      "copying build/lib/build/lib/torchkeras/plots.py -> build/bdist.macosx-11.0-arm64/wheel/build/lib/torchkeras\n",
      "copying build/lib/build/lib/torchkeras/utils.py -> build/bdist.macosx-11.0-arm64/wheel/build/lib/torchkeras\n",
      "copying build/lib/build/lib/torchkeras/email.py -> build/bdist.macosx-11.0-arm64/wheel/build/lib/torchkeras\n",
      "copying build/lib/build/lib/torchkeras/pbar.py -> build/bdist.macosx-11.0-arm64/wheel/build/lib/torchkeras\n",
      "copying build/lib/build/lib/torchkeras/data.py -> build/bdist.macosx-11.0-arm64/wheel/build/lib/torchkeras\n",
      "copying build/lib/build/lib/torchkeras/kerascallbacks.py -> build/bdist.macosx-11.0-arm64/wheel/build/lib/torchkeras\n",
      "running install_egg_info\n",
      "Copying torchkeras.egg-info to build/bdist.macosx-11.0-arm64/wheel/torchkeras-3.9.1-py3.9.egg-info\n",
      "running install_scripts\n",
      "creating build/bdist.macosx-11.0-arm64/wheel/torchkeras-3.9.1.dist-info/WHEEL\n",
      "creating 'dist/torchkeras-3.9.1-py3-none-any.whl' and adding 'build/bdist.macosx-11.0-arm64/wheel' to it\n",
      "adding 'build/lib/torchkeras/__init__.py'\n",
      "adding 'build/lib/torchkeras/data.py'\n",
      "adding 'build/lib/torchkeras/eda.py'\n",
      "adding 'build/lib/torchkeras/email.py'\n",
      "adding 'build/lib/torchkeras/hugmodel.py'\n",
      "adding 'build/lib/torchkeras/kerascallbacks.py'\n",
      "adding 'build/lib/torchkeras/kerasmodel.py'\n",
      "adding 'build/lib/torchkeras/metrics.py'\n",
      "adding 'build/lib/torchkeras/pbar.py'\n",
      "adding 'build/lib/torchkeras/plots.py'\n",
      "adding 'build/lib/torchkeras/soup.py'\n",
      "adding 'build/lib/torchkeras/summary.py'\n",
      "adding 'build/lib/torchkeras/utils.py'\n",
      "adding 'build/lib/torchkeras/chat/__init__.py'\n",
      "adding 'build/lib/torchkeras/chat/chatglm.py'\n",
      "adding 'build/lib/torchkeras/chat/chatgpt.py'\n",
      "adding 'build/lib/torchkeras/models/__init__.py'\n",
      "adding 'build/lib/torchkeras/models/resnet.py'\n",
      "adding 'build/lib/torchkeras/models/ssd.py'\n",
      "adding 'build/lib/torchkeras/models/unet.py'\n",
      "adding 'build/lib/torchkeras/tools/catboost.py'\n",
      "adding 'torchkeras/__init__.py'\n",
      "adding 'torchkeras/data.py'\n",
      "adding 'torchkeras/eda.py'\n",
      "adding 'torchkeras/email.py'\n",
      "adding 'torchkeras/hugmodel.py'\n",
      "adding 'torchkeras/kerascallbacks.py'\n",
      "adding 'torchkeras/kerasmodel.py'\n",
      "adding 'torchkeras/metrics.py'\n",
      "adding 'torchkeras/pbar.py'\n",
      "adding 'torchkeras/plots.py'\n",
      "adding 'torchkeras/soup.py'\n",
      "adding 'torchkeras/summary.py'\n",
      "adding 'torchkeras/utils.py'\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Users/liangyun2/miniforge3/envs/tf26/lib/python3.9/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning:     Installing 'torchkeras.assets' as data is deprecated, please list it in `packages`.\n",
      "    !!\n",
      "\n",
      "\n",
      "    ############################\n",
      "    # Package would be ignored #\n",
      "    ############################\n",
      "    Python recognizes 'torchkeras.assets' as an importable package,\n",
      "    but it is not listed in the `packages` configuration of setuptools.\n",
      "\n",
      "    'torchkeras.assets' has been automatically added to the distribution only\n",
      "    because it may contain data files, but this behavior is likely to change\n",
      "    in future versions of setuptools (and therefore is considered deprecated).\n",
      "\n",
      "    Please make sure that 'torchkeras.assets' is included as a package by using\n",
      "    the `packages` configuration field or the proper discovery methods\n",
      "    (for example by using `find_namespace_packages(...)`/`find_namespace:`\n",
      "    instead of `find_packages(...)`/`find:`).\n",
      "\n",
      "    You can read more about \"package discovery\" and \"data files\" on setuptools\n",
      "    documentation page.\n",
      "\n",
      "\n",
      "!!\n",
      "\n",
      "  check.warn(importable)\n",
      "/Users/liangyun2/miniforge3/envs/tf26/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.\n",
      "  warnings.warn(\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "adding 'torchkeras/assets/SimHei.ttf'\n",
      "adding 'torchkeras/assets/park.jpg'\n",
      "adding 'torchkeras/assets/zidane.jpg'\n",
      "adding 'torchkeras/chat/__init__.py'\n",
      "adding 'torchkeras/chat/chatglm.py'\n",
      "adding 'torchkeras/chat/chatgpt.py'\n",
      "adding 'torchkeras/models/__init__.py'\n",
      "adding 'torchkeras/models/resnet.py'\n",
      "adding 'torchkeras/models/ssd.py'\n",
      "adding 'torchkeras/models/unet.py'\n",
      "adding 'torchkeras/tools/catboost.py'\n",
      "adding 'torchkeras-3.9.1.dist-info/LICENSE'\n",
      "adding 'torchkeras-3.9.1.dist-info/METADATA'\n",
      "adding 'torchkeras-3.9.1.dist-info/WHEEL'\n",
      "adding 'torchkeras-3.9.1.dist-info/top_level.txt'\n",
      "adding 'torchkeras-3.9.1.dist-info/RECORD'\n",
      "removing build/bdist.macosx-11.0-arm64/wheel\n"
     ]
    }
   ],
   "source": [
    "%run setup.py sdist bdist_wheel"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e30d81ab-80c2-4851-8ffb-424a72c5526d",
   "metadata": {},
   "outputs": [],
   "source": [
    "!pip install torchkeras "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "30676d3d",
   "metadata": {},
   "outputs": [],
   "source": [
    "#!pip install --user --upgrade twine\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8becab65",
   "metadata": {},
   "outputs": [],
   "source": [
    "# upload the repository to pypi (test)\n",
    "#!python3 -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e918e7d1",
   "metadata": {},
   "outputs": [],
   "source": [
    "# install the repository from pypi (test)\n",
    "#!python3 -m pip install --index-url https://test.pypi.org/simple/ --no-deps torchkeras"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "9b3e001a-7d9b-4285-bb42-bc1eaeaed9b6",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "639a6307",
   "metadata": {},
   "source": [
    "### Upload to github"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "7a76c373",
   "metadata": {},
   "outputs": [],
   "source": [
    "!git config --global user.name \"lyhue1991\"\n",
    "!git config --global user.email \"lyhue1991@163.com\"\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "7a23b162",
   "metadata": {},
   "outputs": [],
   "source": [
    "!git add -A "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "cdb41033",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[master ca37226] update 3.9.2\n",
      " 24 files changed, 3311 insertions(+), 579 deletions(-)\n",
      " create mode 100644 \"examples/BaiChuan13B_NER\\342\\200\\224\\342\\200\\224transformers.ipynb\"\n",
      " create mode 100644 kerasmodel_example.py\n"
     ]
    }
   ],
   "source": [
    "!git commit -m\"update 3.9.2\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d2667640",
   "metadata": {},
   "outputs": [],
   "source": [
    "#!git config pull.rebase true"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "bcaaf06d",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "remote: Enumerating objects: 7, done.\u001b[K\n",
      "remote: Counting objects: 100% (7/7), done.\u001b[K\n",
      "remote: Compressing objects: 100% (5/5), done.\u001b[K\n",
      "remote: Total 5 (delta 2), reused 0 (delta 0), pack-reused 0\u001b[K\n",
      "Unpacking objects: 100% (5/5), 57.25 KiB | 496.00 KiB/s, done.\n",
      "From github.com:lyhue1991/torchkeras\n",
      " * branch            master     -> FETCH_HEAD\n",
      "   0c0c8bd..9dbbb45  master     -> origin/master\n",
      "Updating 0c0c8bd..9dbbb45\n",
      "Fast-forward\n",
      " ...\\250\\213 - More-Annotation&Colab-Support.ipynb\" | 5804 \u001b[32m++++++++++++++++++++\u001b[m\n",
      " 1 file changed, 5804 insertions(+)\n",
      " create mode 100644 \"examples/ChatGLM2-6b\\345\\276\\256\\350\\260\\203\\344\\277\\235\\345\\247\\206\\347\\272\\247\\346\\225\\231\\347\\250\\213 - More-Annotation&Colab-Support.ipynb\"\n"
     ]
    }
   ],
   "source": [
    "#!git pull origin master "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a543fbf2",
   "metadata": {},
   "outputs": [],
   "source": [
    "!git remote remove origin "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f5d0f1de",
   "metadata": {},
   "outputs": [],
   "source": [
    "!git remote add origin git@github.com:lyhue1991/torchkeras.git"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "12e49933",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Enumerating objects: 47, done.\n",
      "Counting objects: 100% (47/47), done.\n",
      "Delta compression using up to 8 threads\n",
      "Compressing objects: 100% (28/28), done.\n",
      "Writing objects: 100% (28/28), 384.29 KiB | 5.26 MiB/s, done.\n",
      "Total 28 (delta 19), reused 0 (delta 0), pack-reused 0\n",
      "remote: Resolving deltas: 100% (19/19), completed with 18 local objects.\u001b[K\n",
      "To github.com:lyhue1991/torchkeras.git\n",
      "   5504fb9..ca37226  master -> master\n"
     ]
    }
   ],
   "source": [
    "!git push  origin master \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "de4d9b10",
   "metadata": {},
   "outputs": [],
   "source": [
    "!git remote add gitee https://gitee.com/Python_Ai_Road/torchkeras\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "1e3cab48-5eff-4557-9cf0-5deb42441e91",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Enumerating objects: 27, done.\n",
      "Counting objects: 100% (27/27), done.\n",
      "Delta compression using up to 8 threads\n",
      "Compressing objects: 100% (16/16), done.\n",
      "Writing objects: 100% (16/16), 186.04 KiB | 15.50 MiB/s, done.\n",
      "Total 16 (delta 11), reused 0 (delta 0), pack-reused 0\n",
      "remote: Powered by \u001b[01;33mGITEE.COM \u001b[0m[\u001b[01;35mGNK-6.4\u001b[0m]\u001b[0m\u001b[K\n",
      "To https://gitee.com/Python_Ai_Road/torchkeras\n",
      "   1df9ed0..5504fb9  master -> master\n"
     ]
    }
   ],
   "source": [
    "!git push gitee master "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "71c46aa4-7897-4641-9bae-44c76e8d22d9",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "9cb21f22-4464-46fa-9587-0490513f7bdf",
   "metadata": {},
   "outputs": [],
   "source": [
    "#!git reset 462caeb349d "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "32acb452-68b3-4182-b74d-89c0aebfca8e",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "c6115644",
   "metadata": {},
   "source": [
    "## gitignore"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "644f0c51",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Overwriting .gitignore\n"
     ]
    }
   ],
   "source": [
    "%%writefile .gitignore\n",
    ".DS_store\n",
    ".ipynb_checkpoints\n",
    ".ipynb_checkpoints/* \n",
    "torchkeras.egg-info/*\n",
    "dist/*\n",
    "build/*\n",
    "torchkeras/__pycache__/\n",
    "torchkeras/models/__pycache__/\n",
    "examples/datasets/\n",
    "examples/*.pt\n",
    "examples/wandb/\n",
    "torchkeras/ocr/__pycache__/\n",
    "torchkeras/chat/__pycache__/\n",
    "torchkeras/tools/__pycache__/\n",
    "examples/.ipynb_checkpoints\n",
    "examples/__pycache__/\n",
    "torchkeras/chatgpt/__pycache__/\n",
    ".idea\n",
    "mnist\n",
    "output_dir\n",
    "wandb\n",
    "*.pt\n",
    "debug.ipynb\n",
    "cats\n",
    "ImageCleaner\n",
    "runs "
   ]
  }
 ],
 "metadata": {
  "jupytext": {
   "cell_metadata_filter": "-all",
   "main_language": "python",
   "notebook_metadata_filter": "-all"
  },
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
